package com.isotronica.neveras.datos.daos;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.isotronica.neveras.util.vos.ConfigVO;

public class ConfigDAO extends GenericDAO<ConfigVO> {

	public ConfigDAO(Connection connection) {
		super(connection);

		creator = new CallBackCreator<ConfigVO>() {
			public ConfigVO create(ResultSet rs) throws SQLException {
				ConfigVO vo = new ConfigVO();
				vo.setId(rs.getInt("id"));
				vo.setMax(rs.getString("max"));
				return vo;
			}

			public String getIdColumn() {
				return "id";
			}
		};
		super.setCreator(creator);
	}
}
